package PTA.pta_ch0304_03;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle{
    private int width;
    private int length;
    Rectangle(int width,int length){
        this.length = length;
        this.width=width;
    }
public int getPerimeter(){
        return (width+length)*2;
}
public int getArea(){
        return width*length;
}
    @Override
    public String toString() {
        return "Rectangle[" +
                "width=" + width +
                ", length=" + length +
                ']';
    }
}
class Circle{
    private int radius;
    private double s=0;
    Circle(int radius){
        this.radius = radius;
    }
public int getPerimeter(){
        s=2*Math.PI*radius;
        return (int)s;
}
public int getArea(){
        s=Math.PI*radius*radius;
        return (int)s;
}
    @Override
    public String toString() {
        return "Circle{" +
                "radius=" + radius +
                '}';
    }
}
public class Main {
    public static void main(String[] args) {
        Scanner sc=  new Scanner(System.in);
        Rectangle arr[] = new Rectangle[2];

        arr[0]=new Rectangle(sc.nextInt(),sc.nextInt());
        arr[1]=new Rectangle(sc.nextInt(),sc.nextInt());
        Circle c[] = new Circle[2];


        c[0] = new Circle(sc.nextInt());
        c[1] = new Circle(sc.nextInt());
        System.out.println(arr[0].getPerimeter()+arr[1].getPerimeter()+c[0].getPerimeter()+c[1].getPerimeter());
        System.out.println(arr[0].getArea()+arr[1].getArea()+c[0].getArea()+c[1].getArea());
        System.out.println(Arrays.deepToString(arr));
        System.out.println(Arrays.deepToString(c));

    }
}
